package com.video.service;

import com.qf.entity.Page;
import com.qf.entity.RunLogEntity;

import java.io.IOException;
import java.util.Date;
import java.util.List;

public interface IRunLogService {

    /**
     * 创建索引库
     * @return
     */
    boolean createIndex() throws IOException;

    /**
     * 判断索引是否存在
     * @return
     */
    boolean isExistIndex() throws IOException;


    /**
     * 添加文档
     * @param runLogEntity
     * @return
     */
    boolean insertDoc(RunLogEntity runLogEntity) throws IOException;

    /**
     * 根据请求id
     * @param reqId
     * @return
     * @throws IOException
     */
    List<RunLogEntity> search(String reqId) throws IOException;

    /**
     * 搜索所有请求标识 - 分页
     * @param page
     * @return
     * @throws IOException
     */
    Page<List<RunLogEntity>> searchList(Page page) throws IOException;

    /**
     * 根据时间范围删除文档
     * @param startTime
     * @param endTime
     * @return
     * @throws IOException
     */
    boolean deleteDocs(Date startTime, Date endTime) throws IOException;
}
